//
//  MBProgressHUDEx.swift
//  ezyform
//
//  Created by FengMoennig on 1/12/16.
//  Copyright © 2016 Client.Solution Pty Ltd. All rights reserved.
//

import UIKit
import MBProgressHUD
extension MBProgressHUD {
    class func showText(_ text: String,view : UIView,delay: TimeInterval = 0){
        // 快速显示一个提示信息
        let hud = MBProgressHUD.showAdded(to: view, animated: true)
        hud?.labelText = text
        // 设置图片
        // 再设置模式
        hud?.mode = MBProgressHUDMode.text
        // 隐藏时候从父控件中移除
        hud?.removeFromSuperViewOnHide = true;
        hud?.dimBackground = true
        // 1秒之后再消失
        hud?.hide(true, afterDelay: delay)
    }
}
